home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************************
- #
- # GridEncode.h
- #
- # This is just a very simple encoder that shows how to build GRID and TILE resources.
- # The TILE resource is a set of 32x32x1 byte tiles. This encoder takes a picture and
- # dices it into 32x32 tiles, which it writes out to output file. It then builds a
- # standard grid, repeating the original picture as a pattern across the grid.
- #
- # Eventually, it would be nice to make a program that lets someone graphically edit
- # the available list of tiles and the actual GRID resource, much like any number
- # of map editors out for various games.
- #
- #
- #
- # Author: Timothy Carroll
- # Apple Developer Technical Support
- # timc@apple.com
- #
- # Modification History:
- #
- # 8/15/96 TMC Initial Release
- #
- # Copyright © 1996 Apple Computer, Inc., All Rights Reserved
- #
- #
- # You may incorporate this sample code into your applications without
- # restriction, though the sample code has been provided "AS IS" and the
- # responsibility for its operation is 100% yours. However, what you are
- # not permitted to do is to redistribute the source as "DSC Sample Code"
- # after having made changes. If you're going to re-distribute the source,
- # we require that you make it clear in the source that the code was
- # descended from Apple Sample Code, but that you've made changes.
- #
- *************************************************************************************/
-
- #ifndef _GRIDENCODE_
- #define _GRIDENCODE_
-
- #pragma once
-
- const int kPICTInputResID = 128; // resource ID of the PICT to dice.
- const int kOutputResID = 500; // resource ID used for the GRID and TILE output
-
- const int kGridWidth = 44;
- const int kGridHeight = 44;
-
- const int kTileSize = 1024; // 32 x 32 x 1 byte
-
- extern OSStatus GridTileEncode (short inputFileResNum, short outputFileResNum);
-
- #endif // _GRIDENCODE_